home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 2.2 KB | 67 lines | [TEXT/KAHL] |
- //------------------------- © 1994-1995 by James G. Stout --------------------------
- // File : cdef3D.h
- // Date : May 2, 1994
- // Author : Jim Stout
- // Purpose : A CDEF to implement some 3D buttons
- // :
- // : This CDEF supports the System 7 style gray drawing of an
- // : inactive control and the useWindFont varCode.
- //----------------------------------------------------------------------------------
- #define useWindBG 0x04
-
- #define EMBOSS 1
- #define NORMAL 0
- #define PUSHED 1
- #define OFF 0
-
- #define WINBITMAP(w) ((((WindowPeek)(w))->port).portBits)
- #define WINPORTRECT(w) ((((WindowPeek)(w))->port).portRect)
-
- enum {
- vDark = 0,
- dark,
- medDark,
- medLight,
- light,
- vLight
- };
-
- //----------------------------------------------------------------------------------
- // CDEF private data
- //----------------------------------------------------------------------------------
- typedef struct {
- short txFont;
- short txSize;
- short txFace;
- }CDEFData,**CDEFHandle;
-
- //----------------------------------------------------------------------------------
- // Function prototypes
- //----------------------------------------------------------------------------------
-
- static void doDraw (ControlHandle theCtl, short varCode);
- pascal void drawControl (short depth, short dFlags, GDHandle theDevice, long userData);
-
- static void drawPush (ControlHandle theCtl, Rect *r, short varCode, Boolean inColor,
- short lnHt, short lnAdj);
-
- static void getIndicatorRect (Rect *rr, Rect *r);
-
- static void drawCheck (ControlHandle theCtl, Rect *r, Boolean inColor);
-
- static void drawRadio (ControlHandle theCtl, Rect *r, Boolean inColor, Boolean inactive);
-
- static void do3DRadio (ControlHandle theCtl, Rect *r);
-
- static void drawTitle (ControlHandle theCtl, Rect *r, short varCode, short lnHt,
- short lnAdj, Boolean emboss, Boolean pushed);
- static void getNextLine (Str255 t, Str255 s, short num);
-
- static void do3DPush (ControlHandle theCtl, short varCode, Rect *r, Boolean hilite);
-
- static void mixColor (RGBColor *light, RGBColor *dark, short shade, RGBColor *result);
-
- static PixMapHandle getLockedPixels (CGrafPtr * offPort, short qdVers);
- static void unlockPixels (PixMapHandle pmHdl, short qdVers);
- static short getQDVers (void);
-